Technote TE 26 | June 1993 |
Written by Norbert Lindenberg
Inside Macintosh: Text documents the text handling functionality in System 7.1. This Technical Note gives you some additional information that lets you design software using Inside Macintosh: Text and make it work on system software before System 7.1, going back to System 6.0.7.
Inside Macintosh: Text is the best documentation on Macintosh text handling (especially its international aspects) that you've ever had, but it focuses on the functionality available in System 7.1. Many of the features documented in the book were newly introduced in System 7.0 or even in System 7.1. If your software has to be able to run on System 7.0 and System 6.0.7, you will have to use some older, now obsolete routines, that are no longer documented in Inside Macintosh: Text, or fill in some gaps by writing your own code.
This technical note gives you an overview of the trouble areas. The idea is that you design or internationalize your software using the information in Inside Macintosh: Text (which, after all, is the most coherent documentation available), and then check this Technical Note to find out where you have to add code in order to be able to run on older system software.
If your software already makes use of the old Script Manager and International Utilities calls, you may want to check the appendix "Renamed and Relocated Text Routines" in Inside Macintosh: Text to find out which new routines you can take advantage of in System 7.1.
This technical note may refer you to the following documentation:
The Text Services Manager and the Dictionary Manager are new in System 7.1. Before using them, make sure to check for their existence using Gestalt.
The following table shows the routines of other text managers that are new in System 7.1, which earlier routines can be used instead of them, and where to find documentation for the precursors:
Routine Name |
Precursor |
Documentation for Precursor |
|
CharByte |
IM V-306; WWD 142 |
|
CharType |
IM V-306-307; WWD 142-143 |
|
ParseTable |
WWD 178-179 |
|
FindWord |
IM V-309; WWD 145-146 |
|
-- |
-- |
|
-- |
-- |
|
LowerText |
IM VI-14-62 |
|
-- |
-- |
|
-- |
-- |
|
7.0: StripText |
IM VI-14-63 |
|
6.x: -- (see Note) |
|
|
Transliterate |
IM V-311-312 |
|
7.0: StripUpperText |
IM VI-14-63 |
|
6.x: -- (see Note) |
|
|
7.0: UpperText |
IM VI-14-63 |
|
6.x: -- (see Note) |
|
Note: The routines StripText, StripUpperText, and UpperText are available on some machines running System 6.x -- namely the Macintosh IIci, IIfx, IIsi, LC, and Portable. If you don't want to check for individual machines, however, you should assume that they are not available before System 7.0.
Note: IM VI mentions the NFindWord routine as a replacement for the older FindWord routine. We do not recommend using NFindWord -- FindWord works and is a functional superset of NFindWord.
The following constants for Script Manager routines are new in System 7.1 and cannot be used in earlier systems:
itlc: The field itlcSysFlags was added to this resource type in System 7.1.
itl2: A new format of the script run table was defined for System 7.1. Both the old and the new format are documented in IM Text B-40 to B-43, and both continue to be supported.
trsl: This resource type is new in System 7.1 and cannot be used in earlier systems.
The following table shows the routines that are new in System 7.0, which earlier routines can be used instead of them, and where to find documentation for the precursors:
Routine Name |
Precursor |
Documentation for Precursor |
|
Char2Pixel |
IM V-308-309; WWD 140-142 |
|
-- |
-- |
|
IUCompString |
IM I-506 |
|
IUMagString |
IM I-506 |
|
DrawJust |
IM V-310-311; WWD 144 |
|
-- (see Note) |
-- |
|
-- |
-- |
|
-- (see Note) |
-- |
|
-- (see Note) |
-- |
|
IUEqualString |
IM I-506-507 |
|
IUMagIDString |
IM I-507 |
|
-- (see Note) |
-- |
|
-- |
-- |
|
MeasureJust |
IM V-311; WWD 178 |
|
-- (see Note) |
-- |
|
Pixel2Char |
IM V-307-308; TN Pixel2Char; WWD 179-181 |
|
PortionText |
WWD 182-183 |
|
-- |
-- |
|
-- |
-- |
|
-- (see Note) |
-- |
|
-- (see Note) |
-- |
|
-- |
-- |
|
-- |
-- |
|
-- |
-- |
|
-- |
-- |
Note: The Font Manager routines supporting TrueType may be available on machines running System 6.x, for example, if StyleWriter software is installed. If Gestalt with the gestaltFontMgrAttr tells you that outline fonts are available (bit gestaltOutlineFonts is set), the Font Manager routines FlushFonts, GetOutlinePreferred, GetPreserveGlyph, IsOutline, OutlineMetrics, SetOutlinePreferred, and SetPreserveGlyph are available.
The following constants for TextEdit routines are new in System 7.0 and cannot be used in earlier systems:
The following constants for Script Manager routines are new in System 7.0 and cannot be used in earlier systems:
Note: You may find extended "itlb" resources in some versions of System 6.0.7, but they are not guaranteed to exist or be supported in all versions.
Thanks to Jeannette Cheng, Peter Edberg, and Kenny Tung for reviewing this document and providing me with some historical information.